﻿using System.Collections.ObjectModel;

namespace T4UtilityBelt.DataDesigns
{
    public class EntityCollection : ObservableCollection<Entity>
    {
        internal EntityCollection(EntityModel entitymodel)
        {
            EntityModel = entitymodel;
        }

        public EntityModel EntityModel { get; internal set; }

        protected override void InsertItem(int index, Entity item)
        {
            item.EntityModel = EntityModel;
            base.InsertItem(index, item);
        }
    }
}